//
//  RCDiscountSubView.h
//  RocketProject
//
//  Created by Wu Chengwei on 13-6-29.
//  Copyright (c) 2013年 Rocket. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "LVBaseTableView.h"
#import "RCMerchantsListDataModel.h"
#import "IManager+ModuleDiscount.h"
#import "CommonDefines.h"
#import <CoreLocation/CoreLocation.h>

@protocol RCDiscountSubViewDelegate <NSObject>

@optional
-(void)beginRequestData;
-(void)endRequestData;
-(void)requestFinishedData:(RCMerchantsListDataModel *)discountDataModel;
-(void)gotoDiscountChildView:(RCMerchant *)itemInfo WithChildViewType:(DiscountType)subViewType;

@end

@interface RCDiscountSubView : LVBaseTableView<IManagerDelegate>

@property(nonatomic,assign)int64_t requestID;
@property(nonatomic, copy)   NSString *typeID;
@property(nonatomic,assign)id<RCDiscountSubViewDelegate> delegate;
@property(nonatomic,assign)DiscountType discountType;
@property(nonatomic,retain)NSMutableArray *itemListArray;
@property(nonatomic,retain)CLLocation     *location;
@property(nonatomic, retain) RCMerchantsListDataModel *discountDataInfo;
@property(nonatomic, retain) NSString *cityID;
@property(nonatomic, assign) int currentOffset;
@property(nonatomic, assign) int currentReturnNumber;
@property(nonatomic, copy)   NSString *typeName;
@property(nonatomic, retain) UITableView *moreTypeTableView;
@property(nonatomic, assign) BOOL hasLoadMoreType;
@property(nonatomic, copy)   NSString *moreTypeID;
@property(nonatomic, assign) BOOL isMoreTableFont;

- (id)initWithFrame:(CGRect)frame andDelegate:(id<RCDiscountSubViewDelegate>)aDelegate andType:(NSString *)typeID andTypeName:(NSString *)typeName andLocation:(CLLocation *)currentLocation;

-(void) reloadData;

-(void) clearDelegate;

-(void) viewDidUnload;

-(void)requestDataList:(BOOL)isRefreshData;

-(void)requestMoreTypeData;

-(void)switchTabbarButtonClicked;

@end
